import static org.junit.Assert.*;

import org.junit.Test;


public class JSParserTestClass {

	@Test
	public void testSingleParseString() {
		String[] expected_result = new String [1];
		expected_result[0] = "test";
		JSParser myClass = new Parser();
		assertArrayEquals(expected_result, myClass.parseString("test"));
	}
	
	@Test
	public void testEmptyParseString() {
		String[] expected_result = new String [1];
		expected_result[0] = "";
		JSParser myClass = new Parser();
		assertArrayEquals(expected_result, myClass.parseString(""));
	}
	
	@Test
	public void testManyParseString() {
		String[] expected_result = new String [4];
		expected_result[0] = "test1";
		expected_result[1] = "test2";
		expected_result[2] = "test3";
		expected_result[3] = "test4";
		JSParser myClass = new Parser();
		assertArrayEquals(expected_result, myClass.parseString("test1 test2 test3 test4"));
	}
	
	@Test
	public void testTrimParseString() {
		String[] expected_result = new String [4];
		expected_result[0] = "test1";
		expected_result[1] = "test2";
		expected_result[2] = "test3";
		expected_result[3] = "test4";
		JSParser myClass = new Parser();
		assertArrayEquals(expected_result, myClass.parseString(" test1   test2 test3  test4  "));
	}


}
